﻿/**********************************************************************
 * @file   GUIObjectColorMapDialog.h
 * @brief  工程颜色绘制界面声明
 * @author liuzhonghua (liuzhonghuaszch@163.com)
 * @date   2025-01-16
 *********************************************************************/
#ifndef _GUIObjectColorMapDialog_H
#define _GUIObjectColorMapDialog_H

#include "GUIToolDialogAPI.h"
#include "GUIWidget/GUIDialogBase.h"

namespace Ui {
    class GUIObjectColorMapDialog;
}

namespace GUI
{
    /**
     * @brief  可见性窗口管理
     * @author liuzhonghua (liuzhonghuaszch@163.com)
     * @date   2025-01-16
     */
    class GUIToolDialogAPI GUIObjectColorMapDialog :public GUIDialogBase
    {
        Q_OBJECT;
    public:
        /**
         * @brief    构造函数
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-16
         */
        GUIObjectColorMapDialog(QWidget* parent = nullptr);
        /**
         * @brief    析构函数
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-16
         */
        virtual ~GUIObjectColorMapDialog();
    private slots:

        /**
         * @brief    确定时间
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-16
         */
        void on_pushButton_OK_clicked();
        /**
         * @brief    取消事件
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-16
         */
        void on_pushButton_Cancel_clicked();
        /**
         * @brief    应用事件
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-16
         */
        void on_pushButton_Apply_clicked();
        /**
         * @brief    恢复事件
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-16
         */
        void on_pushButton_Restore_clicked();
        /**
         * @brief    修改物理属性梁颜色点击事件
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-16
         */
        void on_pushButton_PhyProp_Beam_clicked();
        /**
         * @brief    修改物理属性自由阻尼层合板颜色点击事件
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-16
         */
        void on_pushButton_PhyProp_General_clicked();
        /**
         * @brief    修改物理属性加筋板颜色点击事件
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-16
         */
        void on_pushButton_PhyProp_Ribbed_clicked();
        /**
         * @brief    修改物理属性均质板颜色点击事件
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-16
         */
        void on_pushButton_PhyProp_Uniform_clicked();
        /**
         * @brief    修改流体材料颜色点击事件
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-16
         */
        void on_pushButton_MaterialFluids_clicked();
        /**
         * @brief    修改FE属性颜色点击事件
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-20
         */
        void on_pushButton_PhyProp_FEProp_clicked();
        /**
         * @brief    输入物理属性梁颜色完成事件
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-16
         */
        void on_lineEdit_PhyProp_Beam_editingFinished();
        /**
         * @brief    输入物理属性自由阻尼层合板颜色完成事件
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-16
         */
        void on_lineEdit_PhyProp_General_editingFinished();
        /**
         * @brief    输入物理属性加筋板颜色完成事件
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-16
         */
        void on_lineEdit_PhyProp_Ribbed_editingFinished();
        /**
         * @brief    输入物理属性均质板颜色完成事件
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-16
         */
        void on_lineEdit_PhyProp_Uniform_editingFinished();
        /**
         * @brief    输入流体材料颜色完成事件
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-16
         */
        void on_lineEdit_MaterialFluids_editingFinished();
        /**
         * @brief    输入FE属性颜色完成事件
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-20
         */
        void on_lineEdit_PhyProp_FEProp_editingFinished();

    private:
        /**
         * @brief    初始化
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-16
         */
        void init();
        /**
         * @brief    处理颜色数据
         * @param[i] colorOri 
         * @param[o] colorStr 
         * @return   bool
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-17
         */
        bool processColorData(QString colorOri, QString& colorStr);
        /**
         * @brief    从界面设置数据
         * @return   void
         * @author   liuzhonghua (liuzhonghuaszch@163.com)
         * @date     2025-01-20
         */
        void setDataFromWidget();

    private:
        /**
         * @brief  ui
         * @author BaGuijun (baguijun@163.com)
         * @date   2024-12-23
         */
        Ui::GUIObjectColorMapDialog* _ui = nullptr;
    };
}

#endif
